<div class="easyui-layout" style="height: 100%">
    <div data-options="region:'center'" style="padding:5px;">
        <form style="margin: 0px;padding: 0px;"  method="post" >
            <table width="100%" class="sztable" align="center">
                <tr>
                    <input type="hidden" name="roleId" />
                </tr>
                <tr>
                    <td class="sztabletext" width="20%">角色名称</td>
                    <td width="30%">
                        <input name="name" type="text"  style="width:200px;"
                               class="easyui-textbox"  maxLength="20"
                               data-options="required:true"/>
                    </td>
                </tr>
                <tr>
                    <td class="sztabletext" width="20%">角色状态</td>
                    <td width="30%">
                        <#dictTag name="status" showType="radio" dictCode="roleStatus" width="200"></#dictTag>
                    </td>
                </tr>
                <tr>
                </tr>
            </table>
        </form>
    </div>
    <div data-options="region:'east',split:true,title:'角色权限'" style="width:200px;">
        <ul id="grantMenuTree" class="ztree" style=""></ul>
    </div>
</div>
<script type="text/javascript">

    $(function(){
        var treeData = ${menuList};

        //树相关内容
        var setting = {
            data: {
                simpleData: {
                    idKey :"id",
                    pIdKey:"pId",
                    enable: true
                },
                key : {
                    name : "name"
                }
            },
            view : {
                selectedMulti: true
            },
            check : {
                enable: true,
                chkStyle : "checkbox"
            },
            callback: {
            }
        };

        if(treeData){

            $.fn.zTree.init($("#grantMenuTree"), setting, treeData);	//创建树
            $.fn.zTree.getZTreeObj("grantMenuTree").expandAll(false);
        }
    });
</script>
